home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Ss-Sz / Stack Builder 4.1 Shell.cpt / Stack Builder v4.1 Shell / stack_-1.xml < prev    next >
Extensible Markup Language  |  1987-11-12  |  12KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1 Shell</name>
  5.     <id>-1</id>
  6.     <cardCount>7</cardCount>
  7.     <cardID>2976</cardID>
  8.     <listID>4584</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on openStackglobal menu1, menu2, priorLevel, font, newName, index, flagglobal wordTotal, bigName, littleName, charTotal, checkpointput the userLevel into priorLeveldo "InstallMenu"set the userLevel to 5push recent cardput 0 into flagdo "textSetUp"end openStack-----------------------------------------------------------------------on closeStackglobal userLevel, priorLevelset userLevel to priorLevelgo to card id 2976do "RemoveMenu"end closeStack------------------------------------------------on textSetUpglobal menu1, menu2--enableMenu menu1,1,trueenableMenu menu1,2,trueenableMenu menu1,3,trueenableMenu menu1,5,falseenableMenu menu1,6,falseenableMenu menu1,7,falseenableMenu menu1,8,falseenableMenu menu1,12,false--enableMenu menu2,1,falseenableMenu menu2,2,falseenableMenu menu2,3,falseenableMenu menu2,4,falseenableMenu menu2,5,falseenableMenu menu2,6,falseend textSetUp----------------on textSetUp2global menu1enableMenu menu1,1,falseenableMenu menu1,2,falseenableMenu menu1,3,falseend textSetUp2------------------------------------------------on InstallMenuglobal menu1, menu2put NewMenu("Card Tasks","Create Major Topic/W",¬¨"Create Minor Topic/E","Create Graphics Card/G","(-",¬¨"Import Text‚Ķ","Merge Text‚Ķ","Save Text","Save Text As‚Ķ","(-",¬¨"Modifier Keys Help‚Ķ","Stack Builder Help‚Ķ","Install Home Button",¬¨"(-","Quit Stack Builder") into menu1put NewMenu("Font","Monaco-9","Geneva-14","Geneva-12",¬¨"Geneva-10","Cream-10","Cream-12") into menu2end InstallMenu-----------------------------------------------------------------------on RemoveMenuglobal menu1, menu2put DeleteMenu(menu1) into menu1put DeleteMenu(menu2) into menu2end RemoveMenu-----------------------------------------------------------------------on doMenu whichglobal menu1, menu2if which is "Create Major Topic" thendo "createMajor"else if which is "Create Minor Topic" thendo "createMinor"else if which is "Create Graphics Card" thendo "createGraphCard"else if which is "Import Text‚Ķ" thendo "openText"else if which is "Merge Text‚Ķ" thendo "mergeText"else if which is "Save Text" thendo "exportText"else if which is "Save Text As‚Ķ" thendo "exportText2"else if which is "Modifier Keys Help‚Ķ" thendo "modKeysHelp"else if which is "Stack Builder Help‚Ķ" thendo "About"else if which is "Install Home Button" thendo "SBbuttonMaker"else if which is "Quit Stack Builder" thendo "QuitStackBuilder"else if which is "Monaco-9" thenSet textFont of background field id 26 to MonacoSet textSize of background field id 26 to 9else if which is "Geneva-14" thenSet textFont of background field id 26 to GenevaSet textSize of background field id 26 to 14else if which is "Geneva-12" thenSet textFont of background field id 26 to GenevaSet textSize of background field id 26 to 12else if which is "Geneva-10" thenSet textFont of background field id 26 to GenevaSet textSize of background field id 26 to 10else if which is "Cream-10" thenSet textFont of background field id 26 to CreamSet textSize of background field id 26 to 10else if which is "Cream-12" thenSet textFont of background field id 26 to CreamSet textSize of background field id 26 to 12elsepass doMenuend ifend doMenu-----------------------------------------------------------------------on createGraphCardglobal newName, index, flag, wordTotalhide Message Boxset lockScreen to Trueput 0 into flagput the id of this card into indexgo to card id 6936                  -- master graphics carddomenu "Copy Card"---do "modKeys"if flag = 5 thenexit createGraphCardelse---if flag = 3 thenexit createGraphCardelse---put 3 into flagdo "buttonMaker"---------end ifend ifend createGraphCard-----------------------------------------------------------------------on openTextglobal bigName, littleName, flag, charTotal, checkpointif flag ‚↠4 thendo "saveCheck"if checkpoint = 1 thenexit openTextend ifend ifGet FileName("TEXT")if it is empty thenexit openTextelseput it into bigNameend ifput bigName into temprepeat with x = 1 to length of tempif char x of temp = ":" thenput return into char x of tempend ifend repeatput last line of temp into littleNameopen file bigNameread from file bigName for 16385if it is empty thenclose file bigNameend ifclose file bigNameput the number of chars of it into counterif flag = 4 thenadd charTotal to counterend ifif counter > 16383 thenbeepanswer "Oops! File greater than 16383 chars!" with "Try again!" or¬¨"Cancel"if it is "Try again!" thenif flag = 4 thendo "openText"elseput "untitled" into bkgnd field id 31do "openText"end ifelseexit "openText"end ifelseif flag = 4 thenput number of lines in background field "info1" into lineCounteradd 1 to lineCounterput it into line lineCounter of field "info1"elseput it into bkgnd field "Info1"put littleName into bkgnd field id 31end ifdo "charCount"do "wordCount"end ifput 0 into flagend openText-----------------------------------------------------------------------on exportTextif bkgnd field id 31 is "untitled" thenGet PutFile("Save text as:","")put it into bigNameif it is empty thenexit exportTextend ifopen file bigNamewrite bkgnd field "Info1" to file bigNameclose file bigNameput bigName into temprepeat with x = 1 to length of tempif char x of temp = ":" thenput return into char x of tempend ifend repeatput last line of temp into littleNameput littleName into bkgnd field id 31elseput background field id 31 into last line of bigNameopen file bigNamewrite bkgnd field "Info1" to file bigNameclose file bigNameend ifend exportText-----------------------------------------------------------------------on exportText2global bigName, littleNameGet PutFile("Save text as:","")put it into bigNameif it is empty thenexit exportText2end ifopen file bigNamewrite bkgnd field "Info1" to file bigNameclose file bigNameput bigName into temprepeat with x = 1 to length of tempif char x of temp = ":" thenput return into char x of tempend ifend repeatput last line of temp into littleNameput littleName into bkgnd field id 31end exportText2-----------------------------------------------------------------------on saveCheckglobal checkpointput 0 into checkpointif bkgnd field "Info1" is empty thenexit saveCheckelsebeepanswer "Save changes before closing?" with "Nope!" or "Please do!"¬¨or "Cancel"if it is "Please do!" thendo "exportText"elseif it is "Cancel" thenput 1 into checkPointexit saveCheckend ifend ifput empty into bkgnd field "Info1"put untitled into bkgnd field id 31put 0 into bkgnd field id 32put 0 into bkgnd field id 33end ifend saveCheck-----------------------------------------------------------------------on mergeTextglobal flag, charTotalplay harpsichord tempo 400 "gq"answer "Merge text behind existing text?" with "OK" or "Cancel"if it is "OK" thenput number of chars in background field "info1" into charTotalset cursor to 4elseif it is "Cancel" thenexit mergeTextend ifend ifput 4 into flagdo "openText"end mergeText-----------------------------------------------------------------------on charCountput the number of chars of bkgnd field "Info1" into charHolderput charHolder into bkgnd field id 32end charCount-----------------------------------------------------------------------on wordCountput the number of words of bkgnd field "Info1" into wordHolderput wordHolder into bkgnd field id 33end wordCount-----------------------------------------------------------------------on createMajorglobal newName, index, flag, wordTotalhide Message Boxset lockScreen to Trueput 0 into flagput the id of this card into indexgo to card id 6183                    --master topic card1domenu "Copy Card"---do "modKeys"if flag = 5 thenexit createMajorelse---if flag = 3 thenexit createMajorelse---put 1 into flagdo "buttonMaker"----------end ifend ifend createMajor-----------------------------------------------------------------------on createMinorglobal newName, index, flag, wordTotalhide Message Boxset lockScreen to Trueput 0 into flagput the id of this card into indexgo to card id 7893                  -- master info card1domenu "Copy Card"---do "modKeys"if flag = 5 thenexit createMinorelse---if flag = 3 thenexit createMinorelse---put 2 into flagdo "buttonMaker"---------end ifend ifend createMinor-----------------------------------------------------------------------on modKeysglobal newName, index, wordTotal, flagcloseCardgo to indexdomenu "Paste Card"set the script of this card to emptyask "What is the new topic or heading?"if it is empty thendomenu "Delete Card"go to indexput 3 into flagexit modKeyselseput it into newNameif the length of newName > 25 then----------do "tooLong"----------elseif the shiftKey is down and the optionKey is down thenput the number of words of newName into wordTotal--------do "eachCap"--------elseif the shiftKey is down then--------do "allCap"--------end if----------end ifend ifend ifend modKeys-----------------------------------------------------------------------function newTopic numglobal flagput the id of this card into indexif the commandKey is down thenchoose button toolclick at the clickLocget the short name of the targetput item 1 of the clickLoc into xput item 2 of the clickLoc into yplay harpsichord tempo 400 "fq"answer "Delete topic and it's info card?" with "OK" or "Cancel"if it is "OK" thenset cursor to 4play harpsichord tempo 400 "gq"set the loc of message to 25,303put "Deleting button and compacting the stack‚Ķ" into messageshow Message Boxclick at x,ydoMenu "Cut Button"set lockScreen to Truego to numdoMenu "Delete card"go to indexdoMenu "Compact Stack"play harpsichord tempo 400 "gq cq"hide Message Boxset lockScreen to Falseend ifchoose browse toolend ifreturn numend newTopic-----------------------------------------------------------------------on firstCapglobal newNameput the CharToNum of first character of newName into tempif temp >= 97 and temp <= 122 thenput temp - 32 into tempput the NumToChar of temp into first character of newNameend ifend firstCap-----------------------------------------------------------------------on eachCapglobal newName, wordTotalrepeat with x = 1 to wordTotalput the CharToNum of first character of word x of newName into tempif temp >= 97 and temp <= 122 thenput temp - 32 into tempput the NumToChar of temp into first character of word x of newNameend ifend repeatend eachCap-----------------------------------------------------------------------on allCapglobal newNamerepeat with x=1 to the length of newName -- capitalize all lettersput the charToNum of char x of newName into tempif temp>=97 and temp <=122 thenput temp - 32 into tempput the numToChar of temp into char x of newNameend ifend repeatend allCap-----------------------------------------------------------------------on tooLongglobal index, flagdomenu "Delete Card"go to indexset lockScreen to falsebeepanswer "Only 25 characters are allowed! Try again‚Ķ" with "OK"put 5 into flagset lockScreen to Trueend tooLong-----------------------------------------------------------------------on buttonMakerglobal newName, index, flagif flag is 1 thenput newName into field "Topic Name"put empty into bkgnd field id 18else if flag is 2 thenput newName into field "Title Field"put empty into bkgnd field id 35put "untitled" into bkgnd field id 31put 0 into bkgnd field id 32else if flag is 3 thenput newName into field "Graphic Card Name"put empty into bkgnd field id 2end ifset lockScreen to Falseset the name of this card to newNameput the id of this card into tempset